<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>白马酒店</title>
    <script src="../js/axios-0.18.0.js"></script>
    <script src="../js/vue.js"></script>
    <!--引入elementUI的js库，必须在vue之后-->
    <script src="../element-ui/lib/index.js"></script>
    <!--引入elementUI的css库-->
    <link rel="stylesheet" href="../element-ui/lib/theme-chalk/index.css">
    <script src="../js/echarts.js"></script>
</head>
<body>

<div id="main" style="width: 600px;height:400px;"></div>


<script type="module">
    // new Vue({
    //     el: '#main'
    // })
    import * as echarts from '../js/echarts.js';
    var chartDom = document.getElementById('main');
    var myChart = echarts.init(chartDom);
    var option;

    option = {
        // title: {
        //     text: 'Temperature Change in the Coming Week'
        // },
        // tooltip: {
        //     trigger: 'axis'
        // },
        // legend: {},
        // toolbox: {
        //     show: true,
        //     feature: {
        //         dataZoom: {
        //             yAxisIndex: 'none'
        //         },
        //         dataView: {
        //             readOnly: false
        //         },
        //         magicType: {
        //             type: ['line', 'bar']
        //         },
        //         restore: {},
        //         saveAsImage: {}
        //     }
        // },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                formatter: '{value} °C'
            }
        },


        series: [
            {
                name: 'Highest',
                type: 'line',
                data: [10, 11, 13, 11, 12, 12, 9],
                markPoint: {
                    data: [
                        { type: 'max', name: 'Max' },
                        { type: 'min', name: 'Min' }
                    ]
                },
                markLine: {
                    data: [{ type: 'average', name: 'Avg' }]
                }
            },
            {
                name: 'Lowest',
                type: 'line',
                data: [1, -2, 2, 5, 3, 2, 0],
                markPoint: {
                    data: [{ name: '周最低', value: -2, xAxis: 1, yAxis: -1.5 }]
                },
                markLine: {
                    data: [
                        { type: 'average', name: 'Avg' },
                        [
                            {
                                symbol: 'none',
                                x: '90%',
                                yAxis: 'max'
                            },
                            {
                                symbol: 'circle',
                                label: {
                                    position: 'start',
                                    formatter: 'Max'
                                },
                                type: 'max',
                                name: '最高点'
                            }
                        ]
                    ]
                }
            }
        ]
    };
    option && myChart.setOption(option);
</script>
</body>
</html>
